import Vue from 'vue'
import Router from 'vue-router'
import login from '../components/login'
import home from '../components/home'
import drug from "../components/drug";
import infoPage from "../components/InfoPage";
import message from "../components/message";
import room from "../components/room";
import nurse from "../components/nurse";
import physis from "../components/physis";

Vue.use(Router);


export default new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      component: login
    },
    {
      path:'/home',
      name:'home',
      component:home,
      children:[
        {
        path:'/room',
        name:'room',
        component:room,
      },
        {
          path:'/drug',
          name:'drug',
          component:drug,
        },
        {
          path:'/infoPage',
          name:'infoPage',
          component:infoPage,
        },
        {
          path:'/message',
          name:'message',
          component:message,
        },
        {
          path:'/nurse',
          name:'nurse',
          component:nurse,
        },
        {
          path:'/physis',
          name:'physis',
          component:physis,
        }
      ]
    }
  ]
})
